﻿@namespace BootstrapBlazor.Components
@inherits ComponentBase

@{
    var fileName = Path.GetFileName(Uri);
    var trueFileName = GetFileName?.Invoke(fileName) ?? fileName;
}
<a href="@Uri" download="@trueFileName" target="_blank" title="@trueFileName" @attributes=Attributes>
    <Center>
        <TofuCubesSimple Text="@trueFileName" Width="@Width">
            <RenderIcon>
                <FileIcon Extension="@Path.GetExtension(Uri)" />
            </RenderIcon>
        </TofuCubesSimple>
    </Center>
</a>